﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace Mvc.XForms.UI.Settings {
	public class GridHeadSortableSettings {
		public IGridHeadSortable GridHeadSortable;

		public GridHeadSortableSettings(IGridHeadSortable sortable) {
			GridHeadSortable = sortable;
		}

		public override string ToString() {
			return GridHeadSortable.Render();
		}

		public GridHeadSortableSettings Label(string label) {
			GridHeadSortable.Label = label;
			return this;
		}

		public GridHeadSortableSettings DefaultDesc() {
			GridHeadSortable.DefaultSortDirection = SortDirection.Descending;
			return this;
		}

		public GridHeadSortableSettings CssClass(string cssClass) {
			GridHeadSortable.CssClass.Add(cssClass);
			return this;
		}
	}
}
